﻿#pragma once

#include "../../MessageQueue.h"
#include "../PlayerObject.h"
#include "../../MirDatabase/MapInfo.h"
#include "../../../Shared/Enums.h"
#include "../../../Shared/Data/ItemData.h"
#include "../MonsterObject.h"
#include <string>
#include <stdexcept>
#include <any>
#include "../../../stringhelper.h"

using namespace log4net;
using namespace Server::MirDatabase;

namespace Server::MirObjects
{
    class Reporting
    {
    private:
        static ILog *const log;

    public:
        virtual ~Reporting()
        {
            delete _player;
        }

    protected:
        static Server::MessageQueue *getMessageQueue();

    private:
        PlayerObject *const _player;

    public:
        Reporting(PlayerObject *player);

        #pragma region Move Actions

//C# TO C++ CONVERTER NOTE: The following .NET attribute has no direct equivalent in C++:
//ORIGINAL LINE: public void MapChange(MapInfo oldMap, MapInfo newMap, [CallerMemberName] string source = "")
        void MapChange(MapInfo *oldMap, MapInfo *newMap, const std::string &source = "");

        #pragma endregion

        #pragma region Item Actions

//C# TO C++ CONVERTER NOTE: The following .NET attribute has no direct equivalent in C++:
//ORIGINAL LINE: public void ItemSplit(UserItem item, UserItem newItem, MirGridType grid, [CallerMemberName] string source = "")
        void ItemSplit(UserItem *item, UserItem *newItem, MirGridType grid, const std::string &source = "");

//C# TO C++ CONVERTER NOTE: The following .NET attribute has no direct equivalent in C++:
//ORIGINAL LINE: public void ItemMerged(UserItem fromItem, UserItem toItem, int slotFrom, int slotTo, MirGridType gridFrom, MirGridType gridTo, [CallerMemberName] string source = "")
        void ItemMerged(UserItem *fromItem, UserItem *toItem, int slotFrom, int slotTo, MirGridType gridFrom, MirGridType gridTo, const std::string &source = "");
//C# TO C++ CONVERTER NOTE: The following .NET attribute has no direct equivalent in C++:
//ORIGINAL LINE: public void ItemCombined(UserItem fromItem, UserItem toItem, int slotFrom, int slotTo, MirGridType grid, [CallerMemberName] string source = "")
        void ItemCombined(UserItem *fromItem, UserItem *toItem, int slotFrom, int slotTo, MirGridType grid, const std::string &source = "");

//C# TO C++ CONVERTER NOTE: The following .NET attribute has no direct equivalent in C++:
//ORIGINAL LINE: public void ItemMoved(UserItem item, MirGridType from, MirGridType to, int slotFrom, int slotTo, string info = "", [CallerMemberName] string source = "")
        void ItemMoved(UserItem *item, MirGridType from, MirGridType to, int slotFrom, int slotTo, const std::string &info = "", const std::string &source = "");

//C# TO C++ CONVERTER NOTE: The following .NET attribute has no direct equivalent in C++:
//ORIGINAL LINE: public void ItemChanged(UserItem item, uint amount, int state, [CallerMemberName] string source = "")
        void ItemChanged(UserItem *item, unsigned int amount, int state, const std::string &source = "");

//C# TO C++ CONVERTER NOTE: The following .NET attribute has no direct equivalent in C++:
//ORIGINAL LINE: public void ItemGSBought(GameShopItem item, uint amount, uint CreditCost, uint GoldCost, [CallerMemberName] string source = "")
        void ItemGSBought(GameShopItem *item, unsigned int amount, unsigned int CreditCost, unsigned int GoldCost, const std::string &source = "");

//C# TO C++ CONVERTER NOTE: The following .NET attribute has no direct equivalent in C++:
//ORIGINAL LINE: public void ItemMailed(UserItem item, uint amount, int reason, [CallerMemberName] string source = "")
        void ItemMailed(UserItem *item, unsigned int amount, int reason, const std::string &source = "");

//C# TO C++ CONVERTER NOTE: The following .NET attribute has no direct equivalent in C++:
//ORIGINAL LINE: public void GoldChanged(uint amount, bool lost = true, string info = "", [CallerMemberName] string source = "")
        void GoldChanged(unsigned int amount, bool lost = true, const std::string &info = "", const std::string &source = "");

//C# TO C++ CONVERTER NOTE: The following .NET attribute has no direct equivalent in C++:
//ORIGINAL LINE: public void CreditChanged(uint amount, bool lost = true, string info = "", [CallerMemberName] string source = "")
        void CreditChanged(unsigned int amount, bool lost = true, const std::string &info = "", const std::string &source = "");

//C# TO C++ CONVERTER NOTE: The following .NET attribute has no direct equivalent in C++:
//ORIGINAL LINE: public void ItemError(MirGridType from, MirGridType to, int slotFrom, int slotTo, [CallerMemberName] string source = "")
        void ItemError(MirGridType from, MirGridType to, int slotFrom, int slotTo, const std::string &source = "");

        #pragma endregion

        #pragma region Kill Actions

//C# TO C++ CONVERTER NOTE: The following .NET attribute has no direct equivalent in C++:
//ORIGINAL LINE: public void KilledPlayer(PlayerObject obj, string info = "", [CallerMemberName] string source = "")
        void KilledPlayer(PlayerObject *obj, const std::string &info = "", const std::string &source = "");

//C# TO C++ CONVERTER NOTE: The following .NET attribute has no direct equivalent in C++:
//ORIGINAL LINE: public void KilledMonster(MonsterObject obj, string info = "", [CallerMemberName] string source = "")
        void KilledMonster(MonsterObject *obj, const std::string &info = "", const std::string &source = "");

        #pragma endregion

        #pragma region Other Actions

        void Levelled(int level);

        void Died(const std::string &map);

        void Connected(const std::string &ipAddress);

        void Disconnected(const std::string &reason);

        #pragma endregion

        #pragma region Private Methods

    private:
        void LogMessage(const std::string &message, const std::string &source);

        #pragma endregion
    };
}
